package com.lais.record.base.mapper;

import com.lais.record.base.pojo.Account;
import com.lais.record.common.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @Author: luowen
 * @Description:
 * @Date: Create in 21:58 2019/11/27
 */
public interface AccountMapper extends BaseMapper<Account> {

    /**
     * 根据ids修改账户状态
     * @param ids
     */
    @Update("update t_account set updated = now(),status='0' where uid = #{uid} and id in  <foreach collection=\"ids\" item=\"id\" open=\"(\" close=\")\" separator=\",\">#{id}</foreach>")
    void updateStatusByIds(@Param("ids") List<String> ids,@Param("uid") String uid);
}
